package com.fjc.mapper;

import com.fjc.annotation.AutoFill;
import com.fjc.dto.MedicinePageQueryDTO;
import com.fjc.entity.Medicine;
import com.fjc.enumeration.OperationType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface MedicineMapper {

    /**
     * 插入药品数据
     * @param medicine
     */
    @AutoFill(value = OperationType.INSERT)
    void insert(Medicine medicine);

    /**
     * 药品分页查询
     * @param medicinePageQueryDTO
     * @return
     */
    Page<Medicine> pageQuery(MedicinePageQueryDTO medicinePageQueryDTO);
}
